package com.yxym.enum_;
@SuppressWarnings({"all"})//位置只能为方法或者类
public class EnumExercise01 {
    public static void main(String[] args) {
        Week[] weeks = Week.values();
        System.out.println("=================");
        for (Week week : weeks) {
            System.out.println(week);

        }
    }

    //定义枚举类
    enum Week {
        MONDAY("周一"),
        TUESDAY("周二"),
        WEDNESDAY("周三"),
        THURSDAY("周四"),
        FRIDAY("周五"),
        SATURDAY("周六"),
        SUNDAY("周日");;
        private String name;

        private Week(String name) {
            this.name = name;
        }

        public String getName() {
            return name;
        }

        @Override
        public String toString() {
            return name;
        }
    }
}